//
//  CZMenuItemViewModel.m
//  QQ空间
//
//  Created by zhangping on 16/1/18.
//  Copyright © 2016年 zhangping. All rights reserved.
//

#import "CZMenuItemViewModel.h"
#import "CZMenuItem.h"

@implementation CZMenuItemViewModel
@synthesize composeItems = _composeItems;
@synthesize menuItems = _menuItems;

- (NSArray *)composeItems {
    if (_composeItems == nil) {
        NSMutableArray *array = [[NSMutableArray alloc] init];
        
        NSArray *items = @[@{@"title": @"写说说", @"imageName": @"tabbar_mood", @"composeButton": @YES, @"detailVCClassName": @"CZMoodViewController"},
                           @{@"title": @"传照片", @"imageName": @"tabbar_photo", @"composeButton": @YES, @"detailVCClassName": @"CZPhotoViewController"},
                           @{@"title": @"写日志", @"imageName": @"tabbar_blog", @"composeButton": @YES, @"detailVCClassName": @"CZBlogViewController"}];
        
        for (NSDictionary *dict in items) {
            CZMenuItem *item = [CZMenuItem menuItemWithDict:dict];
            
            [array addObject:item];
        }
        
        _composeItems = array;
    }
    
    return _composeItems;
}

- (NSArray *)menuItems {
    if (_menuItems == nil) {
        NSMutableArray *array = [[NSMutableArray alloc] init];
        
        NSArray *items = @[@{@"title": @"全部动态", @"imageName": @"tab_bar_feed_icon", @"detailVCClassName": @"CZHomeViewController"},
                           @{@"title": @"与我相关", @"imageName": @"tab_bar_passive_feed_icon", @"detailVCClassName": @"CZAboutMeViewController"},
                           @{@"title": @"照片墙", @"imageName": @"tab_bar_pic_wall_icon", @"detailVCClassName": @"CZPictureWallViewController"},
                           @{@"title": @"电子相框", @"imageName": @"tab_bar_e_album_icon", @"detailVCClassName": @"CZAlbumViewController"},
                           @{@"title": @"好友", @"imageName": @"tab_bar_friend_icon", @"detailVCClassName": @"CZMyFriendsViewController"},
                           @{@"title": @"更多", @"imageName": @"tab_bar_e_more_icon", @"detailVCClassName": @"CZMoreViewController"}];
        
        for (NSDictionary *dict in items) {
            CZMenuItem *item = [CZMenuItem menuItemWithDict:dict];
            [array addObject:item];
        }
        
        _menuItems = array;
    }
    
    return _menuItems;
}
@end
